]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Don't count the separator as an item when returning isEmpty
authorMichael Wood <michael.g.wood@intel.com>
Mon, 15 Jul 2013 18:16:30 +0000 (19:16 +0100)
committerMichael Wood <michael.g.wood@intel.com>
Wed, 17 Jul 2013 15:40:51 +0000 (16:40 +0100)
If we have a separator don't use it's possibly-unsynced visibility to
determine if the menu is empty or not.

https://bugzilla.gnome.org/show_bug.cgi?id=70386

js/ui/popupMenu.js

index 42dd6f7e9d28977bfccb3d29233c2bf15d5d7aa6..78f25db6867be0948d357e8c8c48f59053a1d622 100644 (file)
@@ -722,6 +722,8 @@ const PopupMenuBase = new Lang.Class({
 
     isEmpty: function() {
         let hasVisibleChildren = this.box.get_children().some(function(child) {
+            if (child._delegate instanceof PopupSeparatorMenuItem)
+                return false;
             return child.visible;
         });